Wireless network access control method, device, and system

ABSTRACT

Embodiments of the present invention disclose a wireless network access control method, device, and computer readable medium. The method includes: receiving via a mobile network an access request sent by a user device for requesting Internet access by using a wireless network of a wireless access device after a sharing status of the wireless network is set to be enabled by a setting device; and performing control processing to allow the user device to access the Internet by using the wireless network, such that the wireless access device processes Internet data related to the user device via the wireless network after the user device accesses the Internet by using the wireless network.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/601,130, filed on Oct. 14, 2019, which is a continuation of U.S.patent application Ser. No. 15/505,572, filed on Feb. 21, 2017, now U.S.Pat. No. 10,448,317. The U.S. patent application Ser. No. 15/505,572 isa National Stage of International Application No. PCT/CN2014/084926,filed on Aug. 21, 2014. All of the aforementioned applications arehereby incorporated by reference in their entireties.

TECHNICAL FIELD

Embodiments of the present invention relate to the field ofcommunications technologies, and in particular, to a wireless networkaccess control method, device, and system.

BACKGROUND

With development of the mobile Internet, wireless access devices such asa wireless router and a home gateway are increasingly popular inenterprises and families. Therefore, increasingly wide mobile Internetcoverage is provided, so that a user can conveniently access the mobileInternet by using a wireless network device.

Wireless access and over-the-air transfer are used in the mobileInternet. Therefore, when user device searches for a nearby wirelessnetwork, if no access password is set for the wireless network, the userdevice may access the wireless network. If knowing an access password ofthe wireless network, the user device may access the wireless network byusing the access password. If not knowing an access password of thewireless network, the user device may crack the access password of thewireless network by using password cracking software, so as to accessthe wireless network. Therefore, in a specific case, a large quantity ofuser device may access a wireless network, and this may cause adifficulty in accessing the wireless network or affect network servicequality of the wireless network.

To improve network service quality of a wireless network, an owner ofthe wireless network may also perform security protection on an accesspassword, so that other user device cannot access the wireless network.In this case, when the owner of the wireless network does not use thewireless network, because other user device cannot access the wirelessnetwork, a waste of wireless network resources is caused.

It may be learned that in an existing wireless network access controltechnology, a method that can flexibly control wireless network accessis lacking, where the method not only avoids a waste of wireless networkresources, but also does not affect wireless network access quality.

SUMMARY

The present invention provides a wireless network access control method,device, and system, so that wireless network access can be controlledflexibly. This not only avoids a waste of wireless network resources,but also does not affect wireless network access quality.

According to a first aspect, an embodiment of the present inventionprovides a wireless network access control method, including:

-   -   receiving, by a control device, a wireless network access        request message sent by user device, where the wireless network        access request message includes an identifier of at least one        wireless network;    -   obtaining, by the control device, a preset access condition        parameter corresponding to the identifier of the wireless        network; and    -   sending, by the control device, the identifier and an access        password that are of the wireless network to the user device        when determining, according to the preset access condition        parameter, that a current access condition parameter of the        wireless network meets the preset access condition parameter, so        that the user device accesses the wireless network according to        the identifier and the access password that are of the wireless        network, where the current access condition parameter is a        current access condition parameter of the wireless network that        is obtained by the control device.

In a first possible implementation manner of the first aspect, beforethe obtaining, by the control device, a preset access conditionparameter corresponding to the identifier of the wireless network, themethod further includes:

-   -   receiving, by the control device, the preset access condition        parameter of the wireless network that is sent by a setting        device; and    -   saving, by the control device, the preset access condition        parameter of the wireless network in a control policy parameter        list corresponding to the identifier of the wireless network.

In a second possible implementation manner of the first aspect, withreference to the first possible implementation manner of the firstaspect, the obtaining, by the control device, a preset access conditionparameter corresponding to the identifier of the wireless networkincludes:

-   -   querying, by the control device according to the identifier of        the wireless network in the wireless network access request        message, the control policy parameter list corresponding to the        identifier of the wireless network, to obtain the preset access        condition parameter corresponding to the identifier of the        wireless network.

In a third possible implementation manner of the first aspect, withreference to the first aspect, the first possible implementation mannerof the first aspect, or the second possible implementation manner of thefirst aspect, after the sending, by the control device, the identifierand an access password that are of the wireless network to the userdevice when determining, according to the preset access conditionparameter, that a current access condition parameter of the wirelessnetwork meets the preset access condition parameter, so that the userdevice accesses the wireless network according to the identifier and theaccess password that are of the wireless network, the method furtherincludes:

-   -   receiving, by the control device, status parameter duration of        access to the wireless network that is sent by the user device;        and    -   sending, by the control device, a disconnection request message        to an access device of the wireless network when determining        that the status parameter does not meet the preset access        condition parameter of the wireless network, where the        disconnection request message includes an identifier of the user        device, so that the access device disconnects the user device        from the wireless network according to the identifier of the        user device in the disconnection request message.

In a fourth possible implementation manner of the first aspect, withreference to the first aspect, the first possible implementation mannerof the first aspect, the second possible implementation manner of thefirst aspect, or the third possible implementation manner of the firstaspect, the preset access condition parameter includes at least one ofthe following parameters: an identifier of user device allowed to accessthe wireless network, a largest quantity of user device allowed toaccess the wireless network, longest duration allowed for access to thewireless network, or traffic or bandwidth allowed for access to thewireless network.

According to a second aspect, an embodiment of the present inventionprovides a wireless network access control device, including:

-   -   a receiving unit, configured to receive a wireless network        access request message sent by user device, where the wireless        network access request message includes an identifier of at        least one wireless network;    -   a processing unit, configured to obtain a preset access        condition parameter corresponding to the identifier of the        wireless network; where    -   the processing unit is further configured to: when determining,        according to the preset access condition parameter, that a        current access condition parameter of the wireless network meets        the preset access condition parameter, instruct a sending unit        to send the identifier and an access password that are of the        wireless network to the user device; and    -   the sending unit, configured to send the identifier and the        access password that are of the wireless network to the user        device, so that the user device accesses the wireless network        according to the identifier and the access password that are of        the wireless network, where the current access condition        parameter is a current access condition parameter of the        wireless network that is obtained by the control device.

In a first possible implementation manner of the second aspect, thereceiving unit is further configured to:

-   -   receive the preset access condition parameter of the wireless        network that is sent by a setting device; and    -   the device further includes:    -   a savage unit, configured to save the preset access condition        parameter of the wireless network in a control policy parameter        list corresponding to the identifier of the wireless network.

In a second possible implementation manner of the second aspect, withreference to the first possible implementation manner of the secondaspect, the processing unit is specifically configured to query,according to the identifier of the wireless network in the wirelessnetwork access request message, the control policy parameter listcorresponding to the identifier of the wireless network, to obtain thepreset access condition parameter corresponding to the identifier of thewireless network.

In a third possible implementation manner of the second aspect, withreference to the second aspect, the first possible implementation mannerof the second aspect, or the second possible implementation manner ofthe second aspect, the receiving unit is further configured to:

-   -   receive status parameter duration of access to the wireless        network that is sent by the user device;    -   the processing unit is further configured to: when determining        that the status parameter does not meet the preset access        condition parameter of the wireless network, instruct the        sending unit to send a disconnection request to an access device        of the wireless network; and    -   the sending unit is further configured to send the disconnection        request message to the access device of the wireless network,        where the disconnection request message includes an identifier        of the user device, so that the access device disconnects the        user device from the wireless network according to the        identifier of the user device in the disconnection request        message.

According to a third aspect, an embodiment of the present inventionprovides a wireless network access control system, and the systemincludes a control device and user device; where

-   -   the control device includes the wireless network access control        device described in the second aspect and any one of the        possible implementation manners of the second aspect;    -   the user device is configured to send a wireless network access        request message to the control device, where the wireless        network access request message includes an identifier of at        least one wireless network, so that the control device obtains a        preset access condition parameter corresponding to the        identifier of the wireless network, and sends the identifier and        an access password that are of the wireless network to the user        device when determining that a current access condition        parameter of the wireless network meets the preset access        condition parameter, where the current access condition        parameter is a current access condition parameter of the        wireless network that is obtained by the control device; and    -   the user device is further configured to access the wireless        network according to the identifier and the access password that        are of the wireless network.

In a first possible implementation manner of the third aspect, thesystem further includes:

-   -   a setting device, configured to set the preset access condition        parameter of the wireless network; where    -   the setting device is further configured to send the preset        access condition parameter of the wireless network to an access        device of the wireless network, so that the access device saves        the preset access condition parameter; and    -   the setting device is further configured to send the preset        access condition parameter of the wireless network to the        control device, so that the control device saves the preset        access condition parameter of the wireless network in a control        policy parameter list corresponding to the identifier of the        wireless network.

In a second possible implementation manner of the third aspect, withreference to the third aspect or the first possible implementationmanner of the third aspect, the user device is further configured tosend, to the control device, a status parameter of connection to thewireless network by the user device, so that the control device sends adisconnection request message to the access device of the wirelessnetwork when determining that the status parameter does not meet thepreset access condition parameter of the wireless network, where thedisconnection request message includes an identifier of the user device;and

-   -   the access device is further configured to disconnect the user        device from the wireless network according to the identifier of        the user device in the disconnection request message.

In a third possible implementation manner of the third aspect, withreference to the third aspect, the first possible implementation mannerof the third aspect, or the second possible implementation manner of thethird aspect, the preset access condition parameter includes at leastone of the following parameters: an identifier of user device allowed toaccess the wireless network, a largest quantity of user device allowedto access the wireless network, longest duration allowed for access tothe wireless network, or traffic or bandwidth allowed for access to thewireless network.

According to a fourth aspect, an embodiment of the present inventionprovides a wireless network access control device, including a receiver,a transmitter, and a processor, where the receiver, the transmitter, andthe processor are connected to each other by using a bus; where

-   -   the receiver is configured to receive a wireless network access        request message sent by user device, where the wireless network        access request message includes an identifier of at least one        wireless network;    -   the processor is configured to: obtain a preset access condition        parameter corresponding to the identifier of the wireless        network, and when determining, according to the preset access        condition parameter, that a current access condition parameter        of the wireless network meets the preset access condition        parameter, instruct the transmitter to send the identifier and        an access password that are of the wireless network to the user        device; and    -   the transmitter is configured to send the identifier and the        access password that are of the wireless network to the user        device, so that the user device accesses the wireless network        according to the identifier and the access password that are of        the wireless network, where the current access condition        parameter is a current access condition parameter of the        wireless network that is obtained by the control device.

In a first possible implementation manner of the fourth aspect, thereceiver is further configured to receive the preset access conditionparameter of the wireless network that is sent by a setting device; and

-   -   the processor is further configured to save the preset access        condition parameter of the wireless network in a control policy        parameter list corresponding to the identifier of the wireless        network.

In a second possible implementation manner of the fourth aspect, withreference to the first possible implementation manner of the fourthaspect, the processor is specifically configured to query, according tothe identifier of the wireless network in the wireless network accessrequest message, the control policy parameter list corresponding to theidentifier of the wireless network, to obtain the preset accesscondition parameter corresponding to the identifier of the wirelessnetwork.

In a third possible implementation manner of the fourth aspect, withreference to the fourth aspect, the first possible implementation mannerof the fourth aspect, or the second possible implementation manner ofthe fourth aspect, the receiver is further configured to receive statusparameter duration of access to the wireless network that is sent by theuser device;

-   -   the processor is further configured to: when determining that        the status parameter does not meet the preset access condition        parameter of the wireless network, instruct the sending unit to        send a disconnection request to an access device of the wireless        network; and    -   the transmitter is further configured to send the disconnection        request message to the access device of the wireless network,        where the disconnection request message includes an identifier        of the user device, so that the access device disconnects the        user device from the wireless network according to the        identifier of the user device in the disconnection request        message.

According to the wireless network access control method, device, andsystem provided in the embodiments of the present invention, a controldevice receives a wireless network access request message that is sentby user device and that carries an identifier of at least one wirelessnetwork, and determines, according to the identifier of the wirelessnetwork, a control policy parameter corresponding to the identifier ofthe wireless network. Because the control policy parameter includes apreset access condition parameter, the control device sends the controlpolicy parameter of the wireless network to the user device whendetermining that a current access condition parameter of the wirelessnetwork to be accessed by the user device meets the preset accesscondition parameter, so that the user device accesses the wirelessnetwork according to the control policy parameter, and wireless networkaccess can be controlled flexibly. This not only avoids a waste ofwireless network resources, but also does not affect wireless networkaccess quality.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentinvention or in the prior art more clearly, the following brieflydescribes the accompanying drawings required for describing theembodiments or the prior art. Apparently, the accompanying drawings inthe following description show some embodiments of the presentinvention, and persons of ordinary skill in the art may still deriveother drawings from these accompanying drawings without creativeefforts.

FIG. 1 is a schematic flowchart of a wireless network access controlmethod according to an embodiment of the present invention;

FIG. 2 is a signaling diagram of a wireless network access controlmethod according to another embodiment of the present invention;

FIG. 3 is a schematic structural diagram of a wireless network accesscontrol device according to an embodiment of the present invention;

FIG. 4 is a schematic structural diagram of a wireless network accesscontrol device according to another embodiment of the present invention;and

FIG. 5 is a schematic structural diagram of a wireless network accesscontrol system according to an embodiment of the present invention.

DESCRIPTION OF EMBODIMENTS

To make the objectives, technical solutions, and advantages of theembodiments of the present invention clearer, the following clearly andcompletely describes the technical solutions in the embodiments of thepresent invention with reference to the accompanying drawings in theembodiments of the present invention. Apparently, the describedembodiments are some but not all of the embodiments of the presentinvention. All other embodiments obtained by persons of ordinary skillin the art based on the embodiments of the present invention withoutcreative efforts shall fall within the protection scope of the presentinvention.

The technical solutions of the present invention may be applied tovarious wireless communications systems, such as a Global System forMobile Communications (Global System for Mobile Communications, GSM forshort), a general packet radio service (General Packet Radio Service,GPRS for short) system, a Code Division Multiple Access (Code DivisionMultiple Access, CDMA for short) system, a CDMA2000 system, a WidebandCode Division Multiple Access (Wideband Code Division Multiple Access,WCDMA for short) system, a Long Term Evolution (Long Term Evolution, LTEfor short) system, or a Worldwide Interoperability for Microwave Access(World Interoperability for Microwave Access, WiMAX for short) system.

FIG. 1 is a schematic flowchart of a wireless network access controlmethod according to an embodiment of the present invention. As shown inFIG. 1, the wireless network access control method in this embodimentmay include the following steps.

101. A control device receives a wireless network access request messagesent by user device, where the wireless network access request messageincludes an identifier of at least one wireless network.

When the user device needs to access a wireless network, the user devicemay search for a nearby wireless network, and send an identifier of afound wireless network to the control device. The identifier of thewireless network may be carried in a wireless network access requestmessage and sent to the control device. Specifically, the control devicemay receive, for example, by using a mobile network or an SMS messagechannel, the wireless network access request message sent by the userdevice. The identifier of the wireless network is, for example, aservice set identifier (Service Set Identifier, SSID for short) of thewireless network.

102. The control device obtains a preset access condition parametercorresponding to the identifier of the wireless network.

In another implementation manner of the present invention, before step102, the method may include:

-   -   receiving, by the control device, the preset access condition        parameter of the wireless network that is sent by a setting        device; and    -   saving, by the control device, the preset access condition        parameter of the wireless network in a control policy parameter        list corresponding to the identifier of the wireless network.

Specifically, an owner of the wireless network may set the preset accesscondition parameter of the wireless network of the owner by using thesetting device.

It should be noted that, the user device needs to access a wirelessnetwork to implement a network application service by using the wirelessnetwork, and needs to access the wireless network by using an accessdevice of the wireless network, where the access device is, for example,a device such as a gateway device or a router. Therefore, the foregoingowner of the wireless network is a representation and represents anowner of an access device of the wireless network, for example, an ownerof the foregoing gateway device or an owner of the foregoing router.

In this embodiment, the owner of the wireless network sets, by using thesetting device, the preset access condition parameter required foraccessing the wireless network on the access device corresponding to thewireless network. The preset access condition parameter of the wirelessnetwork is set on the access device corresponding to the wirelessnetwork, so that the preset access condition parameter takes effect onthe access device, and when the user device subsequently needs to accessthe wireless network corresponding to the access device, access controlprocessing is performed, by using the preset access condition parameter,for whether the user device can access the wireless network.

In this embodiment of the present invention, the setting device and theaccess device may be disposed separately, or may be integrated, and thesetting device is mainly configured to implement setting of a controlpolicy parameter on the corresponding access device.

In this embodiment of the present invention, the preset access conditionparameter may include at least one or any combination of the followingparameters: an identifier of user device allowed to access the wirelessnetwork, a largest quantity of user device allowed to access thewireless network, longest duration allowed for access to the wirelessnetwork, or traffic or bandwidth allowed for access to the wirelessnetwork. The preset access condition parameter includes but is notlimited to the parameters listed above.

That the owner of the wireless network sets, by using the settingdevice, the preset access condition parameter required for accessing thewireless network on the access device corresponding to the wirelessnetwork may be implemented in the following manner:

-   -   sending, by the setting device, the preset access condition        parameter of the wireless network to the access device of the        wireless network, so that the access device saves the preset        access condition parameter to make the preset access condition        parameter take effect.

In addition, the setting device not only sends the foregoing presetaccess condition parameter to the access device, but also sends thepreset access condition parameter of the wireless network to the controldevice, so that the control device saves the preset access conditionparameter of the wireless network in the control policy parameter listcorresponding to the identifier of the wireless network.

It should be noted that, if modifying the preset access conditionparameter of the wireless network again, the setting device needs tosend a modified preset access condition parameter of the wirelessnetwork to the access device and the control device, so that the accessdevice and the control device update the preset access conditionparameter of the wireless network.

In another embodiment of the present invention, step 102 mayspecifically include:

-   -   querying, by the control device according to the identifier of        the wireless network that is included in the wireless network        access request message, the control policy parameter list        corresponding to the identifier of the wireless network, to        obtain the preset access condition parameter corresponding to        the identifier of the wireless network.

For savage of preset access condition parameters of different wirelessnetworks, the control device establishes corresponding lists accordingto identifiers of the different wireless networks, and saves the presetaccess condition parameters corresponding to the identifiers of thedifferent wireless networks in the corresponding lists. Therefore, afterreceiving the wireless network access request message sent by the userdevice, the control device queries, according to the identifier of thewireless network in the request message, the list corresponding to theidentifier of the wireless network, to obtain the preset accesscondition parameter corresponding to the identifier of the wirelessnetwork.

103. The control device sends the identifier and an access password thatare of the wireless network to the user device when determining,according to the preset access condition parameter, that a currentaccess condition parameter of the wireless network meets the presetaccess condition parameter, so that the user device accesses thewireless network according to the identifier and the access passwordthat are of the wireless network, where the current access conditionparameter is a current access condition parameter of the wirelessnetwork that is obtained by the control device.

Specifically, at the same time when saving the foregoing preset accesscondition parameter of the wireless network in the control policyparameter list corresponding to the identifier of the wireless network,the control device may also save a correspondence between the identifierof the wireless network, the access password required for accessing thewireless network, and the preset access condition parameter of thewireless network. Therefore, when determining that the current accesscondition parameter of the wireless network meets the preset accesscondition parameter of the wireless network, the control device obtains,according to the foregoing correspondence, the access password and theidentifier that are of the wireless network, and sends the identifierand the access password that are of the wireless network to the userdevice that sends the access request message. In this way, the userdevice may determine the to-be-accessed wireless network according tothe received identifier of the wireless network, and access the wirelessnetwork by using the received access password of the wireless network.

In step 103, the control device determines whether the current accesscondition parameter of the wireless network meets the preset accesscondition parameter. For example, a preset access condition parameter ofthe wireless network N is an identifier of user device allowed to accessthe wireless network N. When the control device obtains the presetaccess condition parameter of the wireless network N according to anidentifier of the wireless network N that is carried in an accessrequest message sent by user device A, and the preset access conditionparameter is the identifier of the user device allowed to access thewireless network N, where for example, user devices whose identifiersare A, B, and C are allowed to access the wireless network N, in thiscase, the control device first obtains a current access conditionparameter of the wireless network N. In this example, the current accesscondition parameter of the wireless network N is, for example, anidentifier of user device that currently has accessed the wirelessnetwork N. For example, user devices that currently have accessed thewireless network N are the user device B and the user device C. Then,the control device determines that the user device A that sends arequest is not included in the user devices that currently have accessedthe wireless network N, and the user device A is included in theidentifiers of the user devices allowed to access the wireless networkN, so that the control device determines that the current accesscondition parameter of the wireless network N meets the preset accesscondition parameter of the wireless network N. On the contrary, if theuser device A is included in the user devices that currently haveaccessed the wireless network N, or the user device A is not included inthe identifiers of the user devices allowed to access the wirelessnetwork N, the control device determines that the current accesscondition parameter of the wireless network N does not meet the presetaccess condition parameter of the wireless network N.

For another example, a preset access condition parameter of the wirelessnetwork N is a largest quantity of user device allowed to access thewireless network N; for example, an upper limit of the quantity of userdevice allowed for access is five. In this case, a current accesscondition parameter of the wireless network N is a quantity of userdevice that has accessed the wireless network N, for example, three userdevices have accessed the wireless network N. Therefore, if the quantityof user device that currently has accessed the wireless network N (thatis, the current access condition parameter) is less than the largestquantity of user device allowed to access the wireless network N (thatis, the preset access condition parameter), the control devicedetermines that the current access condition parameter of the wirelessnetwork N meets the preset access condition parameter of the wirelessnetwork N. On the contrary, if the quantity of user device thatcurrently has accessed the wireless network N is greater than or equalto the largest quantity of user device allowed to access the wirelessnetwork N, it is determined that the current access condition parameterof the wireless network N does not meet the preset access conditionparameter of the wireless network N.

For still another example, a preset access condition parameter of thewireless network N includes traffic or bandwidth allowed for access tothe wireless network N. Traffic is used as an example; for example, 100MB traffic is allocated to each user device. In this case, a currentaccess condition parameter of the wireless network N indicates a volumeof traffic already used by each user device . It should be noted that,if user device has never accessed the wireless network N, in the currentaccess condition parameter of the wireless network N, a volume oftraffic already used by the user device is 0 for the user device.Therefore, if a volume of traffic already used by user device A thatcurrently sends an access request message (that is, the current accesscondition parameter) is less than a largest volume of traffic that thewireless network N allows or allocates to the user device A to use (thatis, the preset access condition parameter), the control devicedetermines that the current access condition parameter of the wirelessnetwork N meets the preset access condition parameter of the wirelessnetwork N. On the contrary, if a volume of traffic already used by userdevice A is greater than or equal to a largest volume of traffic thatthe wireless network N allows or allocates to the user device A to use,it is determined that the current access condition parameter of thewireless network N does not meet the preset access condition parameterof the wireless network N.

For yet another example, a preset access condition parameter of thewireless network N includes longest duration allowed for access to thewireless network N. For example, longest usage duration of 10 hours isallocated to each user device. In this case, a current access conditionparameter of the wireless network N indicates duration already used byeach user device. It should be noted that, if user device has neveraccessed the wireless network N, in the current access conditionparameter of the wireless network N, duration already used by the userdevice is 0 for the user device. Therefore, if duration already used byuser device A that currently sends an access request message (that is,the current access condition parameter) is less than the longestduration that the wireless network N allows the user device A to use(that is, the preset access condition parameter), the control devicedetermines that the current access condition parameter of the wirelessnetwork N meets the preset access condition parameter of the wirelessnetwork N. On the contrary, if duration already used by user device A isgreater than or equal to the longest duration that the wireless networkN allows the user device A to use, it is determined that the currentaccess condition parameter of the wireless network N does not meet thepreset access condition parameter of the wireless network N.

Then, when determining that the foregoing current access conditionparameter of the wireless network meets the preset access conditionparameter of the wireless network, the control device obtains, from thecontrol policy parameter list corresponding to the identifier of thewireless network, the identifier and the access password that are of thewireless network, and sends the identifier and the access password tothe user device that sends the access request message, so that the userdevice accesses the wireless network according to the identifier and theaccess password that are of the wireless network.

In this embodiment, the current access condition parameter of thewireless network is a current access condition parameter of the wirelessnetwork that is obtained by the control device, where the current accesscondition parameter may be sent to the control device by the accessdevice corresponding to the wireless network. Specifically, an accessdevice corresponding to each wireless network may learn, by means ofreal-time or periodic detection, an access status of the wirelessnetwork corresponding to the access device, that is, a current accesscondition parameter of the wireless network, for example, a quantity ofconnected user device or duration already used by each connected userdevice, and send the detected current access condition parameter to thecontrol device, so that the control device can learn the current accessstatus of each wireless network.

It should be noted that, in this embodiment, a wireless network accessrequest message sent by user device to a control device includes anidentifier of at least one wireless network. In a case in which therequest message includes an identifier of only one wireless network,when determining that a current access condition parameter of thewireless network meets a preset access condition parameter of thewireless network, the control device may send only an access password ofthe wireless network to the user device that sends the request message,so that the user device accesses the wireless network according toaccess password of the wireless network; or may send the identifier andan access password that are of the wireless network to the user devicethat sends the request message, so that the user device can know theto-be-accessed wireless network, and access the wireless networkaccording to the access password of the wireless network. In a case inwhich the request message includes identifiers of multiple wirelessnetworks, for example, two wireless networks, if current accesscondition parameters of the multiple wireless networks respectively meetpreset access condition parameters of the multiple wireless networks,the control device sends the identifiers and access passwords that areof the multiple wireless networks to the user device that sends therequest message. During specific implementation, the control device mayseparately send, according to load statuses that are of the multiplewireless networks and are represented by the current access conditionparameters of the multiple wireless networks, the identifiers and theaccess passwords respectively corresponding to the multiple wirelessnetworks to the user device in ascending order of load, so that the userdevice can selectively and preferably access a wireless network withlower load. It should be noted that, the foregoing preset accesscondition parameter of the wireless network may further include asharing status of the wireless network, where the sharing status of thewireless network includes sharing enablement or sharing disablement.when an owner of the wireless network enables sharing of the wirelessnetwork, that is, when the sharing status in the preset access conditionparameter indicates sharing enablement, the control device determineswhether the current access condition parameter of the wireless networkmeets a requirement of another parameter, except the sharing status, inthe preset access condition parameter of the wireless network.

In another embodiment of the present invention, after the user deviceaccesses the wireless network according to the received identifier andthe received access password that are of the wireless network, the userdevice may further send, to the control device according to statusinformation of usage of the wireless network, a status parameter ofconnection to the wireless network by the user device.

Therefore, the control device sends a disconnection request message tothe access device of the wireless network when determining, according tothe status parameter of connection to the wireless network that is sentby the user device, that the status parameter of connection to thewireless network by the user device does not meet the preset accesscondition parameter of the wireless network, where the disconnectionrequest message includes an identifier of the user device, so that theaccess device disconnects the user device from the wireless networkaccording to the identifier of the user device that is included in thedisconnection request message.

The status parameter may include duration of access to the wirelessnetwork by the user device or traffic of connection to the wirelessnetwork, and the status parameter includes but is not limited to theforegoing parameter information.

It should be noted that, the foregoing preset access condition parameterof the wireless network may include a parameter that represents a usagestatus of the wireless network, for example, the foregoing longestduration allowed for access to the wireless network or the foregoingtraffic or bandwidth allowed for access to the wireless network, and mayfurther include a parameter that represents a load status of thewireless network, for example, the foregoing identifier of the userdevice allowed to access the wireless network or the foregoing largestquantity of user device allowed to access the wireless network. In thisembodiment, when the preset condition parameter of the wireless networkincludes the foregoing parameter that represents the usage state, afterthe user device accesses the wireless network, the user device mayfurther send, to the control device according to the status informationof usage of the wireless network by the user device, the statusparameter of connection to the wireless network by the user device.

In this embodiment of the present invention, a control device receives awireless network access request message that is sent by user device andthat carries an identifier of at least one wireless network, anddetermines, according to the identifier of the wireless network, acontrol policy parameter corresponding to the identifier of the wirelessnetwork. Because the control policy parameter includes a preset accesscondition parameter, the control device sends the control policyparameter of the wireless network to the user device when determiningthat a current access condition parameter of the wireless network to beaccessed by the user device meets the preset access condition parameter,so that the user device accesses the wireless network according to theidentifier and an access password that are of the wireless network andthat are in the control policy parameter. A control policy parameter foraccessing a wireless network is properly set, so that wireless networkaccess can be controlled flexibly. This not only avoids a waste ofwireless network resources, but also does not affect wireless networkaccess quality.

FIG. 2 is a signaling diagram of a wireless network access controlmethod according to another embodiment of the present invention. Asshown in FIG. 2, the wireless network access control method involves thefollowing devices: user device, an access device, a setting device, anda control device. The user device is, for example, a mobile phone or atablet computer. When a user corresponding to the user device needs toaccess a wireless network such as a WiFi network to perform a networkservice, the user needs to use the access device to access thecorresponding wireless network. The setting device and the access devicemay be integrated or disposed separately, and the setting device ismainly used by an owner of each wireless network, that is, an owner ofan access device corresponding to each wireless network sets a controlpolicy parameter of the wireless network of the owner by using a settingdevice corresponding to the access device. The control device is mainlyconfigured to: when the user device needs to access a wireless networkcorresponding to an access device, perform, by using a control policyparameter of the wireless network, control processing for whether theuser device can access the wireless network. The wireless network accesscontrol method provided in this embodiment includes the following steps.

201. The setting device sets a preset access condition parameter of awireless network.

202. The setting device sends the preset access condition parameter ofthe wireless network to the access device of the wireless network.

203. The access device saves the preset access condition parameter ofthe wireless network.

The access device may be but is not limited to a device such as awireless router or a switch.

204. The setting device sends the preset access condition parameter ofthe wireless network to the control device.

205. The control device saves the preset access condition parameter ofthe wireless network in a control policy parameter list corresponding toan identifier of the wireless network.

206. The user device sends an access request message to the controldevice.

The access request message includes an identifier of a nearby wirelessnetwork found by the user device. Assuming that identifiers of multiplewireless networks are found nearby, the identifiers of the multiplewireless networks may all be sent to the control device. In anotherembodiment of the present invention, when finding the identifiers of themultiple wireless networks, the user device may sort the found wirelessnetworks according to signal strength of the found wireless networks.Therefore, identifiers of multiple wireless networks that are includedin the access request message are identifiers of a preset quantity ofwireless networks whose signal strength ranks higher and that areobtained after the user device sorts the found wireless networks.

Specifically, the access request message may be sent to the controldevice by using a channel such as a voice channel or an SMS messagechannel, etc. In an SMS message channel scenario, the control deviceneeds a corresponding SMS message access number, and the user deviceuses the access request message as SMS message content, and sends theSMS message content to the control device corresponding to the SMSmessage access number.

207. The control device obtains, according to the identifier of thewireless network that is included in the access request message, thepreset access condition parameter corresponding to the identifier of thewireless network.

208. The control device determines, according to the preset accesscondition parameter, whether a current access condition parameter of thewireless network meets the preset access condition parameter.

209. When the current access condition parameter of the wireless networkmeets the preset access condition parameter, the control device sendsthe identifier and an access password that are of the wireless networkto the user device.

Specifically, when the control device obtains, according to theidentifier of the wireless network that is included in the accessrequest message, the preset access condition parameter corresponding tothe identifier of the wireless network, if the user device uploadsidentifiers of multiple wireless networks, the control device maydetermine, according to a preset rule, a wireless network whoseidentifier and access password are to be preferably returned. Forexample, a upper limit allowed to access a wireless network A are fiveuser devices, and also, upper limit allowed to access a wireless networkB are five user devices.

When five user devices currently have accessed the wireless network A,and also, five user devices currently have accessed the wireless networkB, identifiers and access passwords that are of the wireless network Aand the wireless network B are not returned. For another example, when aquantity of user device that currently has accessed the wireless networkA is less than five, for example, one user device, and a quantity ofuser device that currently has accessed the wireless network B is lessthan five, for example, three user devices, if the preset rule is toreturn an identifier and an access password that are of only oneavailable wireless network to the user device, an identifier and anaccess password that are of the wireless network A are preferably sentto the user device according to access load of the wireless network Aand the wireless network B.

Specifically, the control device may send the identifier and the accesspassword that are of the wireless network A to the user device by usinga channel such as a voice channel or an SMS message channel, etc.

210. The user device accesses the wireless network by using theidentifier and the access password that are of the wireless network.

It is assumed that when the preset access condition parameter of thewireless network includes traffic and duration allowed for access to thewireless network, the control device needs to monitor traffic andduration of access to the wireless network by the user device. Forexample, if longest usage duration of one time connection to thewireless network is one hour, when duration of access to the wirelessnetwork by the user device reaches one hour, the control device may sendthe access device of the wireless network, for example, a request forbreaking wireless connection of the user device, and the access devicebreaks the wireless connection of the user device when receiving therequest for breaking the wireless connection of the user device. In thiscase, the user device needs to obtain the identifier and the accesspassword that are of the wireless network again from the control deviceto perform access again.

Alternatively, the user device regularly updates a status parameter ofconnection to the wireless network. For example, the user device sends,to the control device, the status parameter such as duration and trafficof connection to the wireless network by the user device, so that thecontrol device performs effective control and determining on access ofthe user device to the wireless network.

It should be noted that, when an owner of the wireless network modifies,by using the setting device, the preset access condition parameter ofthe wireless network, for example, modifies a quantity of connected userdevice, bandwidth, or longest access duration, the setting device needsto save a modified preset access condition parameter of the wirelessnetwork on the access device of the wireless network and the controldevice.

After the owner of the wireless network modifies the preset accesscondition parameter of the wireless network by using the setting device,the user device probably cannot access the wireless network. In thiscase, the user device needs to perform the foregoing steps 206 to 209again and execute a wireless network access procedure again.

In this embodiment of the present invention, when receiving an accessrequest message sent by user device, a control device may select anidentifier and an access password that are of an optimal wirelessnetwork according to a preset access condition parameter that is of awireless network and that is set by an owner of the wireless network,and send the identifier and the access password to the user device, sothat the user device accesses the wireless network according to theidentifier and the access password that are of the optimal wirelessnetwork, and wireless network access can be controlled flexibly. Thisnot only avoids a waste of wireless network resources, but also does notaffect wireless network access quality.

FIG. 3 is a schematic structural diagram of a wireless network accesscontrol device according to an embodiment of the present invention. Asshown in FIG. 3, the control device includes:

-   -   a receiving unit 11, configured to receive a wireless network        access request message sent by user device, where the wireless        network access request message includes an identifier of at        least one wireless network;    -   a processing unit 12, configured to obtain a preset access        condition parameter corresponding to the identifier of the        wireless network; where    -   the processing unit 12 is further configured to: when        determining, according to the preset access condition parameter,        that a current access condition parameter of the wireless        network meets the preset access condition parameter, instruct a        sending unit 13 to send the identifier and an access password        that are of the wireless network to the user device; and    -   the sending unit 13, configured to send the identifier and the        access password that are of the wireless network to the user        device, so that the user device accesses the wireless network        according to the identifier and the access password that are of        the wireless network, where the current access condition        parameter is a current access condition parameter of the        wireless network that is obtained by the control device.

It should be noted that, if the processing unit 12 determines that thecurrent access condition parameter of the wireless network cannot meetthe preset access condition parameter, the procedure of accessing thewireless network by the user device ends.

The receiving unit 11 is further configured to:

-   -   receive the preset access condition parameter of the wireless        network that is sent by a setting device.

The device further includes:

-   -   a savage unit 14, configured to save the preset access condition        parameter of the wireless network in a control policy parameter        list corresponding to the identifier of the wireless network.        The processing unit 12 is specifically configured to query,        according to the identifier of the wireless network in the        wireless network access request message, the control policy        parameter list corresponding to the identifier of the wireless        network, to obtain the preset access condition parameter        corresponding to the identifier of the wireless network.

The receiving unit 11 is further configured to:

-   -   receive a status parameter of connection to the wireless network        that is sent by the user device.

The processing unit 12 is further configured to: when determining thatthe status parameter does not meet the preset access condition parameterof the wireless network, instruct the sending unit 13 to send adisconnection request to an access device of the wireless network.

The sending unit 13 is further configured to send the disconnectionrequest message to the access device of the wireless network, where thedisconnection request message includes an identifier of the user device,so that the access device disconnects the user device from the wirelessnetwork according to the identifier of the user device in thedisconnection request message.

It should be noted that the receiving unit 11 may receive, by using avoice channel or an SMS message channel, the wireless network accessrequest message sent by the user device.

The sending unit 13 may send the identifier and the access password thatare of the wireless network to the user device by using a voice channelor an SMS message channel.

The preset access condition parameter includes at least one or anycombination of the following parameters: an identifier of user deviceallowed to access the wireless network, a largest quantity of userdevice allowed to access the wireless network, longest duration allowedfor access to the wireless network, or traffic or bandwidth allowed foraccess to the wireless network.

The control device in this embodiment may be configured to execute thetechnical solutions in the method embodiment shown in FIG. 1 or FIG. 2,and an implementation principle and a technical effect of the controldevice are similar to those of the method embodiment. Details are notdescribed herein again.

FIG. 4 is a schematic structural diagram of a wireless network accesscontrol device according to another embodiment of the present invention.As shown in FIG. 4, the control device includes:

-   -   a receiver 21, a transmitter 22, and a processor 23 connected to        the receiver 21 and the transmitter 22 by using a bus. The        receiver 21 is configured to receive a wireless network access        request message sent by user device, where the wireless network        access request message includes an identifier of at least one        wireless network;    -   the processor 23 is configured to execute the following in the        wireless network access control method described in FIG. 1 or        FIG. 2: obtaining a preset access condition parameter        corresponding to the identifier of the wireless network, and        when determining, according to the preset access condition        parameter, that a current access condition parameter of the        wireless network meets the preset access condition parameter,        instructing the transmitter 22 to send the identifier and an        access password that are of the wireless network to the user        device; and    -   the transmitter 22 is configured to send the identifier and the        access password that are of the wireless network to the user        device, so that the user device accesses the wireless network        according to the identifier and the access password that are of        the wireless network, where the current access condition        parameter is a current access condition parameter of the        wireless network that is obtained by the control device.

The receiver 21 is further configured to receive the preset accesscondition parameter of the wireless network that is sent by a settingdevice.

The processor 23 is further configured to save the preset accesscondition parameter of the wireless network in a control policyparameter list corresponding to the identifier of the wireless network.

The access condition parameter includes at least one or any combinationof the following parameters: an identifier of user device allowed toaccess the wireless network, a largest quantity of user device allowedto access the wireless network, longest duration allowed for access tothe wireless network, or traffic or bandwidth allowed for access to thewireless network.

The processor 23 is further configured to query, according to theidentifier of the wireless network in the wireless network accessrequest message, the control policy parameter list corresponding to theidentifier of the wireless network, to obtain the preset accesscondition parameter corresponding to the identifier of the wirelessnetwork.

The receiver 21 is further configured to receive a status parameter ofconnection to the wireless network that is sent by the user device.

The processor 23 is further configured to: when determining that thestatus parameter does not meet the preset access condition parameter ofthe wireless network, instruct the transmitter 22 to send adisconnection request to an access device of the wireless network.

The transmitter 22 is further configured to send the disconnectionrequest message to the access device of the wireless network, where thedisconnection request message includes an identifier of the user device,so that the access device disconnects the user device from the wirelessnetwork according to the identifier of the user device in thedisconnection request message.

The receiver 21 is further configured to receive, by using a voicechannel or an

SMS message channel, the wireless network access request message sent bythe user device.

Correspondingly, the transmitter 22 is further configured to send theidentifier and the access password that are of the wireless network tothe user device by using a voice channel or an SMS message channel.

The control device in this embodiment may be configured to execute thetechnical solutions in the method embodiment shown in FIG. 1 or FIG. 2,and an implementation principle and a technical effect of the controldevice are similar to those of the method embodiment. Details are notdescribed herein again.

FIG. 5 is a schematic structural diagram of a wireless network accesscontrol system according to an embodiment of the present invention. Asshown in FIG. 5, the system includes:

-   -   a control device 31 and user device 32.

The control device 31 includes the wireless network access controldevice described in FIG. 3 or FIG. 4.

The user device 32 is configured to send a wireless network accessrequest message to the control device 31, where the wireless networkaccess request message includes an identifier of at least one wirelessnetwork, so that the control device 31 obtains a preset access conditionparameter corresponding to the identifier of the wireless network, andsends the identifier and an access password that are of the wirelessnetwork to the user device when determining that a current accesscondition parameter of the wireless network meets the preset accesscondition parameter, where the current access condition parameter is acurrent access condition parameter of the wireless network that isobtained by the control device.

The user device 32 is further configured to access the wireless networkaccording to the identifier and the access password that are of thewireless network and are sent by the control device 31.

The system further includes:

-   -   a setting device 33, configured to set the preset access        condition parameter of the wireless network, where the setting        device 33 is further configured to send the preset access        condition parameter of the wireless network to an access device        34 of the wireless network, so that the access device 34 saves        the preset access condition parameter.    -   The setting device 33 is further configured to send the preset        access condition parameter of the wireless network to the        control device 31, so that the control device 31 saves the        preset access condition parameter of the wireless network in a        control policy parameter list corresponding to the identifier of        the wireless network.

The user device 32 is further configured to send, to the control device31, a status parameter of connection to the wireless network by the userdevice 32, so that the control device 31 sends a disconnection requestmessage to the access device 34 of the wireless network when determiningthat the status parameter does not meet the preset access conditionparameter of the wireless network, where the disconnection requestmessage includes an identifier of the user device 32.

The access device 34 is further configured to disconnect the user device32 from the wireless network according to the identifier of the userdevice 32 in the disconnection request message.

The preset access condition parameter includes at least one or anycombination of the following parameters: an identifier of user deviceallowed to access the wireless network, a largest quantity of userdevice allowed to access the wireless network, longest duration allowedfor access to the wireless network, or traffic or bandwidth allowed foraccess to the wireless network.

It may be clearly understood by persons skilled in the art that, for thepurpose of convenient and brief description, for a detailed workingprocess of the foregoing system and device, reference may be made to acorresponding process in the foregoing method embodiments, and detailsare not described herein again.

Finally, it should be noted that the foregoing embodiments are merelyintended for describing the technical solutions of the presentinvention, but not for limiting the present invention. Although thepresent invention is described in detail with reference to the foregoingembodiments, persons of ordinary skill in the art should understand thatthey may still make modifications to the technical solutions describedin the foregoing embodiments or make equivalent replacements to sometechnical features thereof, without departing from the protection scopeof the technical solutions of the embodiments of the present invention.

What is claimed is:
 1. A method comprising: obtaining, by a wirelessnetwork access control device, a preset access condition parameter of awireless network of the wireless network access control device, thepreset access condition parameter comprising identifiers of one or moredevices allowed to access the wireless network; receiving, by thewireless network access control device, an access request message forthe wireless network from a first terminal, wherein the access requestmessage comprises an identifier of the first terminal; allowing, by thewireless network access control device, the first terminal to access thewireless network, based on the preset access condition parameter.
 2. Themethod of claim 1, further comprising: determining, by the wirelessnetwork access control device, that the identifier of the first terminalmatches the identifier of the access request message.
 3. The method ofclaim 1, wherein allowing, by the wireless network access controldevice, the first terminal to access the wireless network furthercomprises: sending, by the wireless network access control device, anaccess password of the network to the first terminal.
 4. The method ofclaim 1, further comprising: associating, by the wireless network accesscontrol device, the preset access condition parameter of the wirelessnetwork with an identifier of the wireless network; and saving, by thewireless network access control device, the preset access conditionparameter of the wireless network in a control policy parameter listassociated with the identifier of the wireless network.
 5. The method ofclaim 1, wherein the wireless network is a Wi-Fi network.
 6. The methodaccording to claim 1, further comprising: receiving, by the wirelessnetwork access control device, an access status of the first terminal byreal-time or periodic detection, wherein the access status comprises atleast one of the following parameters: duration of access to thewireless network of the first terminal and data traffic to the firstterminal from the wireless network.
 7. The method according to claim 6,wherein the preset access condition parameter further comprises at leastone of the following parameters: a largest quantity of user devicesallowed to access the wireless network, a longest duration allowed foraccessing the wireless network, or traffic or bandwidth allowed whileaccessing the wireless network.
 8. The method according to claim 7,wherein the method further comprises: sending, by the wireless networkaccess control device, a disconnection request message to the firstterminal when determining that the status parameter does not meet thepreset access condition parameter of the wireless network.
 9. A wirelessnetwork access control device, comprising a receiver, a transmitter, amemory, and a processor, where the receiver, the transmitter, thememory, and the processor are connected to each other by a bus, thememory comprises instructions, and the processor, when executing theinstructions, is configured to execute the following steps: obtaining apreset access condition parameter of a wireless network of the wirelessnetwork access control device, the preset access condition parametercomprising identifiers of one or more devices allowed to access thewireless network; receiving an access request message for the wirelessnetwork from a first terminal, wherein the access request messagecomprises an identifier of the first terminal; and allowing the firstterminal to access the wireless network based on the preset accesscondition parameter.
 10. The wireless network access control deviceaccording to claim 9, wherein the processor, when executing theinstructions, is configured to execute the following steps: determiningthat identifier of the first terminal matches the identifier of theaccess request message.
 11. The wireless network access control deviceaccording to claim 9, wherein allowing the first terminal to access thewireless network further comprises: sending an access password of thenetwork to the first terminal.
 12. The wireless network access controldevice according to claim 9, wherein the processor, when executing theinstructions, is configured to execute the following steps: associatingthe preset access condition parameter of the wireless network with anidentifier of the wireless network; and saving the preset accesscondition parameter of the wireless network in a control policyparameter list associated with the identifier of the wireless network.13. The wireless network access control device according to claim 9,wherein the wireless network is a Wi-Fi network.
 14. The wirelessnetwork access control device according to claim 9, wherein theprocessor, when executing the instructions, is configured to execute thefollowing steps: receiving an access status of the first terminal byreal-time or periodic detection, wherein the access status comprises atleast one of the following parameter: duration of access to the wirelessnetwork of the first terminal and data traffic to the first terminalfrom the wireless network.
 15. The wireless network access controldevice according to claim 14, wherein the preset access conditionparameter further comprises at least one of the following parameters: alargest quantity of user devices allowed to access the wireless network,a longest duration allowed for accessing the wireless network, ortraffic or bandwidth allowed while accessing the wireless network. 16.The wireless network access control device according to claim 15,wherein the processor, when executing the instructions, is configured toexecute the following steps: sending, by the wireless network accesscontrol device, a disconnection request message to the first terminalwhen determining that the status parameter does not meet the presetaccess condition parameter of the wireless network.
 17. A computerstorage medium, comprising a computer instruction, wherein when thecomputer instruction is run on a wireless network access control device,the wireless network access control device is enabled to perform thefollowing steps: obtaining a preset access condition parameter of awireless network of the wireless network access control device, thepreset access condition parameter comprising identifiers of one or moredevices allowed to access the wireless network; receiving an accessrequest message for the wireless network from a first terminal, whereinthe access request message comprises an identifier of the firstterminal; allowing the first terminal to access the wireless networkbased on the preset access condition parameter.
 18. The computer storagemedium of claim 17, wherein the wireless network access control deviceis enabled to further perform the following steps: determining that theidentifier of the first terminal matches the identifier of the accessrequest message.
 19. The computer storage medium according to claim 17,wherein allowing the first terminal to access the wireless networkfurther comprises: the wireless network access control device sends theaccess password of the network to the first terminal.
 20. The computerstorage medium according to claim 18, wherein the wireless networkaccess control device is enabled to perform the following steps:receiving, by the wireless network access control device, an accessstatus of the first terminal by real-time or periodic detection, whereinthe access status comprises at least one of the following parameters:duration of access to the wireless network of the first terminal anddata traffic to the first terminal from the wireless network.
 21. Thecomputer storage medium according to claim 20, wherein the wirelessnetwork access control device is enabled to perform the following steps:sending, by the wireless network access control device, a disconnectionrequest message to an first terminal when determining that the statusparameter does not meet the preset access condition parameter of thewireless network, wherein the preset access condition parameter furthercomprises at least one of the following parameters: a largest quantityof user devices allowed to access the wireless network, a longestduration allowed for accessing the wireless network, or traffic orbandwidth allowed while accessing the wireless network.